<?php

use yii\helpers\Html;
use yii\grid\GridView;

/* @var $this yii\web\View */
/* @var $searchModel common\models\projectcontract\ProjectContractSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = Yii::t('app', '项目合同书');
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="project-contract-index">

    <p>
        <?//= Html::a(Yii::t('app', 'Create Project Contract'), ['create'], ['class' => 'btn btn-success']) ?>
    </p>
    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        'filterModel' => $searchModel,
        'columns' => [
            ['class' => 'yii\grid\SerialColumn'],

            'id',
            'number',
            'name',
            'cname',
            'category',
            // 'management',
            // 'bearunit',
            // 'starttime:datetime',
            // 'endtime:datetime',
            // 'bear_property',
            // 'part_unit',
            // 'bear_address',
            // 'bear_postcode',
            // 'unit_leader',
            // 'unit_profession',
            // 'unit_telephone',
            // 'unit_mobile',
            // 'unit_email:email',
            // 'unit_fax',
            // 'proj_leader',
            // 'proj_profession',
            // 'proj_telephone',
            // 'proj_mobile',
            // 'proj_email:email',
            // 'proj_fax',
            // 'proj_target',
            // 'main_task',
            // 'schedule_budget',
            // 'schedule_target',
            // 'schedule_starttime:datetime',
            // 'schedule_endtime:datetime',
            // 'paid_content',
            // 'paid_money',
            // 'paid_note',
            // 'calculation_basis',
            // 'mainpart_name',
            // 'mainpart_age',
            // 'mainpart_profession',
            // 'mainpart_unit',
            // 'mainpart_mainwork',
            // 'common_clause',
            // 'account_name',
            // 'bank_deposit',
            // 'bank_account',
            // 'fina_leader',
            // 'depart_leader',

            [
                'class' => 'yii\grid\ActionColumn',
                'header' => '操作',
                'template' => '{view}{update}',
                'headerOptions' => ['width' => '200'],
                'buttons' => [
                    'view' => function ($url, $model, $key) {
                        return  Html::a('&nbsp;&nbsp;<span class="glyphicon glyphicon-eye-open" ><span class="classformat">查看</span></span>', $url, ['title' => '查看'] ) ;
                    },
                    'update' => function ($url, $model, $key) {
                        return Html::a('&nbsp;&nbsp;<span class="glyphicon glyphicon-pencil"><span class="classformat">修改</span></span>', $url, ['title' => '修改'] ) ;
                    },
                ],
            ],
        ],
    ]); ?>
</div>
